package com.zjpavt.taiyuan.controller.base;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * @Auther: zhuliangyu
 * @Date: 2019/4/1 19:47
 * @Description:
 */
@Configuration
public class WebConfigurer implements WebMvcConfigurer {
	@Resource
	private RequestLogInterceptor requestLogInterceptor;

	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(requestLogInterceptor).addPathPatterns("/**");
	}
}
